package ai.zixing.example02;

import ai.zixing.example01.SDCard;
import ai.zixing.example01.TFCard;

public class SDAdapterTF2 implements SDCard {
    private TFCard tfCard;

    public SDAdapterTF2(TFCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSD() {
        System.out.println("adapter read tf card ");
        return tfCard.readTF();
    }

    @Override
    public void writeSD(String msg) {
        System.out.println("adapter write tf card");
        tfCard.writeTF(msg);
    }
}
